<template>
<section>
  <div class="detail-banner" @click="handleShowGallery">
    <img src="http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_600x330_bf9c4904.jpg">
    <div class="detail-bottom">
      <span class="title">大连圣亚海洋世界(AAAA景区)</span>
      <div class="right-side">
        <span class="iconfont">&#xe626;</span>
        39
      </div>
    </div>
  </div>
  <gallery v-show="showGallery" :imgList="imgList" @close="handleGalleryClosed"></gallery>
</section>

</template>
<script>
import gallery from '@/components/gallery'
export default {
  name: 'Detail',
  data () {
    return {
      imgList: ['http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_800x800_70debc93.jpg', 'http://img1.qunarzz.com/sight/p0/1709/76/7691528bc7d7ad3ca3.img.png_800x800_9ef05ee7.png'],
      showGallery: false
    }
  },
  components: {
    gallery
  },
  methods: {
    handleShowGallery () {
      this.showGallery = true
    },
    handleGalleryClosed () {
      this.showGallery = false
    }
  }
}
</script>
<style lang="stylus" scoped>
@import '~styles/variable.styl'
.detail-banner
  position relative
  overflow hidden
  padding-bottom 55%
  height 0
  img
    width 100%
  .detail-bottom
    position absolute
    right 0
    bottom 0
    left 0
    line-height .6rem
    display flex
    justify-content space-between
    color #fff
    background-image linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, .8))
    .title
      padding 0 .2rem
    .right-side
      padding 0 .2rem
</style>
